<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>gobang</title>
<link rel="style/css" href="css/bootstrap.min.css"/>
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
 <link rel="stylesheet" href="css/demo.css">
<style type="text/css">
*{margin:0px;padding:0px}
body{font-size: 12px;font-family: 微软雅黑}
@font-face {font-family: "iconfont";
  src: url('css/iconfont.eot'); /* IE9*/
  src: url('css/iconfont.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
  url('css/iconfont.woff') format('woff'), /* chrome, firefox */
  url('css/iconfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
  url('css/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
  font-family:"iconfont" !important;
  font-size:100px;
  font-style:normal;
  -webkit-font-smoothing: antialiased;
  -webkit-text-stroke-width: 0.2px;
  -moz-osx-font-smoothing: grayscale;
}
/*header begin*/
.header{width:80%;padding-left:15%;margin:0 auto;}
.header .h_title{font-size: 40px;font-family: 宋体;}
/*header end*/
/*content start*/
.content{width: 80%;margin: 0 auto;padding: 20px;margin-top: 30px;text-align:center;font-size: 15px;font-family: 宋体;}
.content .c_button{width:340px;}
.content .c_registcon,.content .c_buttoncon{margin-bottom: 25px;line-height: 60px;}
.content .form-control,.content .c_button{border-radius: 5px;border-style: solid;}
.content .c_button{cursor:pointer;background-color: #4CAF50;border: none;box-shadow: 0 9px #999;color: wheat;height: 45px;}
.content .c_button:active{background-color: #3e8e41; box-shadow: 0 5px #666;transform: translateY(4px);}
.content .form-control{height: 45px;width: 210px;}
.content span{font-size:30px}
/*content end*/
</style>
<script type="text/javascript">
$(function(){
	$(".c_button").bind("click",function(){
		//检查用户的输入是否合法
		var regName=$.trim($(".form-control").val());
		$.post(
			"regist.do",
			{"username":regName},
			function(res){
				window.location.href="view.jsp";//重新跳转
			},
			"JSON"
		);
		
	})
})
</script>
</head>
<body>
<!-- header begin -->
<div class="header">
   <i class="icon iconfont">&#xe658;</i>
   <p><span class="h_title"> GoBang</span></p>
</div>
<!-- header finish -->

<!-- content begin -->
<div class="content">
<div class="c_registcon">
<span>用户名：</span>	<input type="text" class="form-control" id="name" placeholder="请输入一个游戏昵称"/>
</div>
<div class="c_buttoncon">
<button type="button" class="c_button">开始游戏</button>
</div>
</div>
<!-- content end -->
</body>
</html>